<template>
	<a-col :xl="{ span: 12 }" :lg="{ span: 12 }" :md="{ span: 12 }">
		<a-form-item :label="data.fieldAliase" :labelCol="labelCol" :wrapperCol="wrapperCol">
			<a-rate v-decorator="[`${data.fieldCode}`, { initialValue: data.defaultValue }]" />
			<!-- <a-rate v-model="value" /> -->
		</a-form-item>
	</a-col>
</template>
<script>
export default {
	name: 'InputRate',
	components: {},
	props: {
		form: {
			type: Object,
			required: true,
		},
		data: {
			type: Object,
			required: true,
		},
	},
	data() {
		return {
			labelCol: {
				xs: {
					span: 24,
				},
				sm: {
					span: 3,
				},
			},
			wrapperCol: {
				xs: {
					span: 24,
				},
				sm: {
					span: 20,
				},
			},
			rules: [],
		}
	},
	created() {
		this.init()
	},
	methods: {
		init() {
			const data = this.data
			// console.log(data)
			data.defaultValue = Number(data.defaultValue)
			// this.rules = [
			//   { required: data.isRequired, message: '请输入' + data.fieldAliase }
			// ]
		},
	},
}
</script>
